#include "module_port_property.h"
#include "ui_module_port_property.h"

#include <QDebug>

module_port_property::module_port_property(PortAttribute data, QWidget *parent) :
    QFrame(parent),
    ui(new Ui::module_port_property)
{
    ui->setupUi(this);

    this->setObjectName("Property");

    this->init(data);
}

module_port_property::~module_port_property()
{
    delete ui;
}

void module_port_property::set_InOut(QString InOut)
{
    ui->label_InOut->setText(InOut);
}

void module_port_property::set_name(QString name)
{
    ui->lineEdit_Name->setText(name);
}

void module_port_property::init(PortAttribute data)
{
    ui->lineEdit_Name->setText(data.name);
    ui->label_InOut->setText(data.type);
}
